package io;

import java.io.PrintWriter;

/**
 * 缓冲字符流----最好用的读写字符串的流
 * 是一对高级流，并且是字符流
 * 内部维护一个默认8KB（8192）长度的char数组
 */
public class PWDemo {
    public static void main(String[] args) throws Exception {
        PrintWriter pw = new PrintWriter("hw1.txt");
        pw.println("而我独缺");
        pw.println("你一生的了解");
        pw.close();



        /*FileOutputStream fos = new FileOutputStream("hw1.txt");

        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        BufferedWriter bw = new BufferedWriter(osw);
        PrintWriter pw = new PrintWriter(bw);

        pw.println("董小姐");
        pw.println("难以忘记你的微笑");
        pw.close();*/
    }
}
